#pragma once

namespace	MomogenkyouSystem	{

class	StreamingSoundContainer
{
protected:
	WAVEFORMAT				*	m_pFormat;
	DWORD						m_WaveOffSet;
	DWORD						m_WaveLength;

	StreamingVoiceContext		m_VoiceContext;

	IXAudio2SourceVoice		*	m_pSourceVoice;

	OVERLAPPED					m_OverlappedCurrentRequest;

	BYTE						m_Buffers[3][65536];
	DWORD						m_CurrentDiskReadBuffer;
	DWORD						m_CurrentPosition;

	bool						m_bRepeat;
	bool						m_bFinishedPlaying;
public:
	StreamingSoundContainer();
	virtual	~StreamingSoundContainer();

	void	Update(const float & fInterval);
};
}